import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    hidden:true,
    redirect: '/admin/evaluation',
    // redirect:'/admin/test'
  },
  {
    path:'/404',
    component:() => import('../views/404.vue')
  },
  {
    path:'/admin',
    name:'admin',
    component:() => import('../views/Layout/index.vue'),
    children:[
      // 护理评估
      {
        path:'evaluation',
        name:'evaluation',
        component:()=>import('@/views/Evaluation/evaluation.vue'),
        meta: { title: '护理评估', affix: true }
      },
      // 护理任务
      {
        path:'nursingProblems',
        name:'nursingProblems',
        component:() => import('@/views/nursingTask/nursingProblems.vue'),
        meta: { title: '护理问题'},
      },
      {
        path:'nursingPlan',
        name:'nursingPlan',
        component:() => import('@/views/nursingTask/nursingPlan.vue'),
        meta: { title: '护理计划'},
      },{
        path:'timeTaskList',
        name:'timeTaskList',
        component:() => import('@/views/nursingTask/timeTaskList.vue'),
        meta: { title: '时间轴护理任务清单执行'},
      },{
        path:'nursingRecord',
        name:'nursingRecord',
        component:() => import('@/views/nursingTask/nursingRecord.vue'),
        meta: { title: '一般护理记录单'},
      },  
      {
        path:'test',
        name:'test',
        component:() => import('@/views/Evaluation/overallEvaluation/test.vue'),
        meta: { title: '测试'},
      } 
    ]
  },
  {path:'*',redirect:'/404',hidden:true}
]

const router = new VueRouter({
  routes
})

export default router
